﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace tantrinh.Models
{
    public class SanPham
    {
        public int SanPhamID { get; set; }
        [Required(ErrorMessage = "Chưa nhập mã sản phẩm.")]
        [Display(Name = "Mã Sản Phẩm")]
        public string MaSanPham { get; set; }
        [Required(ErrorMessage = "Chưa nhập tên sản phẩm.")]
        [Display(Name = "Tên Sản Phẩm")]
        public string TenSanPham { get; set; }
        public float GiaSanPham { get; set; }
        public string AnhDaiDien { get; set; }
        public string MoTa { get; set; }
        public int LuotView { get; set; }
        public int ChiTietDanhMucID { get; set; }
        public int NhanHieuID { get; set; }

        [Required(ErrorMessage = "dd/mm/yyyy")]
        [DataType(DataType.Date)]
        [DisplayFormat(DataFormatString = "{0:dd/mm/yyyy}")]
        public DateTime? NgayDang { get; set; }
        public bool TinhTrang { get; set; }

        public virtual ChiTietDanhMuc ChiTietDanhMuc { get; set; }
        public virtual NhanHieu NhanHieu { get; set; }

        public virtual ICollection<HinhAnh> HinhAnh { get; set; }
        public virtual ICollection<ChiTietSanPhamXe> ChiTietSanPhamXe { get; set; }
    }
}